class SingleClazz:
    #   重写 new 方法
    def __new__(cls, *args, **kwargs):
        if not hasattr(cls,'_instance'):
            cls._instance = super().__new__(cls, *args, **kwargs) # 定义一个变量接受类的实例
            pass
        return cls._instance
    pass

s1  = SingleClazz()
print(id(s1))

s2  = SingleClazz()
print(id(s2))
